package com.ys.web.base;

import com.ys.enu.ResultCodeEnum;
import lombok.Data;

/**
 * web接口返回、
 */
@Data
public class base {
    private int code=0;
    private String msg="SUCCESS";
    private Object data;

    public base(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public base() {
    }

    public base(ResultCodeEnum resultCodeEnum, Object data) {
        this.data = data;
        this.code=resultCodeEnum.getCode();
        this.msg=resultCodeEnum.getMsg();
    }

    public base(ResultCodeEnum resultCodeEnum) {
        this.code=resultCodeEnum.getCode();
        this.msg=resultCodeEnum.getMsg();
    }

    public base(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
